home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / shared.dir / 03029_Script_ROLLOVER HOTSPOTS < prev    next >
Text File  |  1996-06-21  |  2KB  |  50 lines

  1. -- ---------------------------------------------------------------
  2. -- Handler processFrameCheckHotspotRoll is given a two parameters.
  3. -- The first is the labelSprite and the second is a list of lists on
  4. -- hotspots of the form:  rolloversprite, labelCast, labelH, labelV.
  5. -- The proper label is displayed when the mouse rolls over a hotpsot
  6. -- in the list.
  7.  
  8. on processFrameCheckHotspotRoll hotspotList
  9.   global labelSprite
  10.   
  11.   set the stretch of sprite labelSprite = TRUE
  12.   puppetSprite labelSprite, FALSE
  13.   processFrame
  14.   
  15.   repeat with i = 1 to count(hotspotList)
  16.     set currentHotspot = getAt(hotspotList,i)
  17.     set hotspotSprite = getAt(currentHotspot,1)
  18.     set labelCast = getAt(currentHotspot,2)
  19.     set labelH = getAt(currentHotspot,3)
  20.     set labelV = getAt(currentHotspot,4)
  21.     
  22.     if rollover(hotspotSprite) then
  23.       puppetSprite labelSprite, TRUE
  24.       
  25.       set the locH of sprite labelSprite = labelH
  26.       set the locV of sprite labelSprite = labelV
  27.       set the castNum of sprite labelSprite = the number of cast labelCast
  28.       set the height of sprite labelSprite = the height of cast labelCast
  29.       set the width of sprite labelSprite = the width of cast labelCast
  30.       updateStage
  31.       --else
  32.       -- checkBackButtonRoll(point(the mouseH, the mouseV))
  33.     end if
  34.     
  35.   end repeat
  36.   updateStage
  37. end
  38.  
  39.  
  40. on processFrameCheckHotspotRollPause hotspotList
  41.   processFrameCheckHotspotRoll hotspotList
  42.   go to the frame
  43. end
  44.  
  45.  
  46. on removeLabels
  47.   global labelSprite
  48.   removeFromStage(labelSprite)
  49. end
  50.